<% if admin_authenticated? %>
<h1>Edit Project</h1>

<%= form_for @project do |f| %>
<% if @project.errors.any? %>
	<h2>Errors:</h2>
	<ul>

<% @project.errors.full_messages.each do |message| %>

<li><%= message %></li>
<%end %>

	</ul>
	<%end%>


<div class="row">

			<div class="span8" style="height:420px;">
				<div style="padding-left:20px">
					<div style="background-color:#f3f3f3;margin-top:10px;width:200px;display:inline-block">
						<%= image_tag(@project.photo.url, :size => "300x200") %>
							<br/>
								<div style="background-color:#f3f3f3;">
     					<p>Photo: <br/>
						<%=f.file_field(:photo)%></p> 
						</div>
					</div>
				
					
					<div >
							
 <%= f.select :program, [['TMP','1'],['TLP','2'],['GCDP','3'],['GIP','4']] %>
  
    <%= f.select :exchange, [['Incoming','0'],['Outgoing','1'],['other','3']] %>
	<h3>	<%= f.label :name %></h3>
		<%= f.text_area :name %>
	
	<h3> <%= f.label :summary %></h3>
		<%= f.text_area :summary %>	
	
 <br/>
		<h1> <%= f.label :description %></h1>
		<%= f.text_area :description %>

 <br/>
		<%= f.submit "Done" %>
	
					</div>
					</div>
			
				</div>
				</div>



	
<% end %>



<script type="text/javascript">
$(document).ready(
function() {
$('#project_description').redactor();
$('#project_name').redactor();
$('#project_summary').redactor();
}
);
</script>
<%else%>

<h1>You' r not authorized to edit projects </h1>

<% end %>